/*
 * meshes.cpp
 *
 *  Created on: 26.04.2013
 *      Author: SomeChineseGuy
 */

#include <vector>
#include <fstream>

#include "meshes.h"

using namespace std;

vector<float> readMeshToVector(const char *filename) {
	ifstream file;
	file.open(filename, ios::in);

	vector<float> mesh;

	unsigned int verticesNum, pointsNum;
	file >> verticesNum >> pointsNum;

	for (unsigned int i = 0; i < verticesNum; i++) {
		for (unsigned int j = 0; j < pointsNum; j++) {
			float cur;
			file >> cur;
			mesh.push_back(cur);
		}
	}

	file.close();

	return mesh;
}
